Rich t kid/introduce dict benchmarks#21860
Merged
kumarUjjawal merged 6 commits intoapache:mainfrom May 7, 2026
Merged
Conversation
9c07966 to
c465861
Compare
c465861 to
7347a93
Compare
kumarUjjawal
reviewed
May 5, 2026
kumarUjjawal
reviewed
May 6, 2026
Contributor
kumarUjjawal
left a comment
There was a problem hiding this comment.
There's something wrong with github so I am not able to post comment on the line number but basically at line 372:
Is this check needed? `schema` is created from the same `query`, and `make_record_batch` always adds `dict_col2` when `query.col2` is `Some`. So this condition looks unreachable?
Contributor
Author
|
Yea I agree. Removed it |
f9e5ee5 to
5befe3f
Compare
Contributor
Author
|
@kumarUjjawal linting error broke the CI, just pushed up a fix |
Contributor
|
Thank you @Rich-T-kid |
kumarUjjawal
added a commit
to Rich-T-kid/datafusion
that referenced
this pull request
May 7, 2026
## Which issue does this PR close? benchmarks for apache#21765. Also related to apache#21860 The goal is to merge this PR and then rebase the branch on apache#21765 to contain these benchmarks, so that they can be run and compared to the original. <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes apache#123` indicates that this PR will close issue apache#123. --> ## Rationale for this change Originally this was included in apache#21765 but that PR is already very large. I decided to move it to its own separate PR <!-- Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed. Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. --> ## What changes are included in this PR? Adds benchmarks for the dictionary encoding array path of **new_group_values()**. <!-- There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR. --> ## Are these changes tested? n/a <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? --> ## Are there any user-facing changes? no <!-- If there are user-facing changes then we may require documentation to be updated before approving the PR. --> <!-- If there are any breaking changes to public APIs, please add the `api change` label. --> --------- Co-authored-by: Kumar Ujjawal <ujjawalpathak6@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
This PR provides the benchmarks mentioned in #7647 & #9017
Rationale for this change
Currently the benchmark suite doesn't have any dictionary-encoded tables with aggregations performed on them. This makes it difficult to prove performance improvements, for example, a separate PR I'm working on (#21765) is hard to validate because the existing benchmarks don't exercise this path. This PR attempts to close that gap.
What changes are included in this PR?
Adds a new dict benchmark to dfbench that measures group-by performance on dictionary-encoded columns across varying cardinality (5/10/25%), null rates (0/15%), and value types (Utf8 and List), covering both single and multi-column group-by scenarios.
Are these changes tested?
--
Are there any user-facing changes?
no